package com.example.common.constant;

import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 *
 * </p>
 *
 * @author zyred
 * @since v 0.1
 **/
public class ProductConstant {

    public static final String CATEGORY_REDIS_KEY = "category_key";
    public static final String CATE_LOG_JSON_DISTRIBUTED_LOCK = "CateLogJsonWithDistributedLock";

    @Getter
    public enum AttrEnum {
        TYPE_ATTR_BASE(1, "基本属性"),
        TYPE_ATTR_SALE(0, "销售属性");

        AttrEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        private final int code;
        private final String msg;
    }

    @Getter
    public enum PublishStatus {
        PUBLISH(1, "上架"),
        OUT(0, "下架");

        PublishStatus(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        private final int code;
        private final String msg;
    }

    @Getter
    public enum CateLogLevel {
        LEVEL_1(1, "一级分类"),
        LEVEL_2(2, "二级分类"),
        LEVEL_3(3, "三级分类");

        CateLogLevel(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        private final int code;
        private final String msg;
    }

}
